from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect
from tower.models import *
from asset.models import *
from login.models import *
# Create your views here.
#资产展示
def assetshow(request):
    '''
    @author:'郭峰'
    @date: 2018/10/24
    渲染html的格式是: {
                        '序号':forloop.counter,
                        '资产名':x.asset.asset_name,
                        '数量':x.asset_num,
                        '房间':x.room.room_num,
                        '用户名':x.room.user.user_name}
    '''
    interchange = Interchange.objects.all()
    context = {'context': interchange}
    return render(request,'show/assetshow.html',context)
    
    
